#include"mystdio.h"

int main(){
  //MY_FILE* mpf = MYfopen("testfile.txt", "w");
  MY_FILE* mpf = MYfopen("testfile.txt", "a");
  if(!mpf){
    return 1;
  }


  //char* msg = (char*)"HelloWorld\n";
  //char* msg = (char*)"HelloWorld\ni am student\n";
  const char *msg =
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n"
    "sahdsalasc\nsashiosdajsa\n";

/*注意：这里直接把所有的文件的刷新当时调整为行刷新了，其它的方式就不测试了 因为另外两种方式写起来简单*/

  MYfwrite(msg, 1, strlen(msg), mpf);

  MYfclose(mpf);
  return 0;
}
